<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <title>编辑</title>
</head>

<body>
<form action="{:url('update')}" method="post">
    <input type="hidden" name="id" value="{$Course->getData('id')}"/>
    <label for="name">name:</label>
    <input type="text" name="name" id="name" value="{$Course->name}"/>
    <br/>
    {volist name="Course->Klasses()->select()" id="klass"}
    <input type="checkbox" name="klass_id[]" id="klass_id_{$klass->id}" value="{$klass->id}" {eq
           name="Course->getIsChecked($klass)" value="true" } checked="checked" {/eq}/>
    <label for="klass_id_{$klass->id}">{$klass->name}</label>
    {/volist}
    <br/>
    <button type="submit">submit</button>
</form>
</body>

</html>
